#!/bin/bash
MSG=`awk '{printf("%s",$0)}' $1`
if [[ $MSG =~ ^(fix bug|complete task\[[0-9]+\]@.*:.*)|(chore:.*)$ ]] 
then
	echo -e "\033[32m commit success! \033[0m"
else
    echo -e "Error: the commit message is irregular1111"
    echo -e "Error: standard format is type[num]@project:description"
	echo -e "Error: see http://199.28.10.129:8080/zentao/doc-view-21.html"
	exit 1
fi
